home *** CD-ROM | disk | FTP | other *** search
/ SGI Origin & Onyx2 Patches 1998 May / Origin and Onyx2 System Disk Patches May 1998.img / dist / patchSG0002871.idb / usr / include / sys / invent.h.z / invent.h
C/C++ Source or Header  |  1998-03-05  |  21KB  |  543 lines

  1. #ifndef  __SYS_INVENT_H__
  2. #define  __SYS_INVENT_H__
  3.  
  4. /*
  5.  * sys/invent.h --  Kernel Hardware Inventory
  6.  *
  7.  * As the system boots, a list of recognized devices is assembled.
  8.  * This list can then be accessed through syssgi() by user-level programs
  9.  * so that they can learn about available peripherals and the system's
  10.  * hardware configuration.
  11.  *
  12.  * The data is organized into a linked list of structures that are composed
  13.  * of an inventory item class and a class-specific type.  Each instance may
  14.  * also specify a 32-bit "state" which might be size, readiness, or
  15.  * anything else that's relevant.
  16.  *
  17.  *
  18.  * $Revision: 1.226 $
  19.  *
  20.  * Copyright 1988-1994, Silicon Graphics, Inc.
  21.  * All Rights Reserved.
  22.  *
  23.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  24.  * the contents of this file may not be disclosed to third parties, copied or
  25.  * duplicated in any form, in whole or in part, without the prior written
  26.  * permission of Silicon Graphics, Inc.
  27.  *
  28.  * RESTRICTED RIGHTS LEGEND:
  29.  * Use, duplication or disclosure by the Government is subject to restrictions
  30.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  31.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  32.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  33.  * rights reserved under the Copyright Laws of the United States.
  34.  */
  35.  
  36. #include "sys/types.h"
  37.  
  38. typedef struct inventory_s {
  39.     struct    inventory_s *inv_next;    /* next inventory record in list */
  40.     int    inv_class;        /* class of object */
  41.     int    inv_type;        /* class sub-type of object */
  42.     major_t    inv_controller;        /* object major identifier */
  43.     minor_t    inv_unit;        /* object minor identifier */
  44.     int    inv_state;        /* information specific to object or
  45.                        class */
  46. } inventory_t;
  47.  
  48. typedef struct cpu_inv_s {
  49.     int    cpuflavor;    /* differentiate processor */
  50.     int    cpufq;        /* cpu frequency */
  51.     int    sdsize;        /* secondary data cache size */
  52. } cpu_inv_t;
  53.  
  54. /* Inventory Classes */
  55. /* when adding a new class, add also to classes[] in hinv.c */
  56. #define INV_PROCESSOR    1
  57. #define INV_DISK    2
  58. #define INV_MEMORY    3
  59. #define INV_SERIAL    4
  60. #define INV_PARALLEL    5
  61. #define INV_TAPE    6
  62. #define INV_GRAPHICS    7
  63. #define INV_NETWORK    8
  64. #define INV_SCSI    9    /* SCSI devices other than disk and tape */
  65. #define INV_AUDIO    10
  66. #define    INV_IOBD    11
  67. #define    INV_VIDEO    12
  68. #define     INV_BUS        13
  69. #define    INV_MISC    14    /* miscellaneous: a catchall */
  70. /*** add post-5.2 classes here for backward compatibility ***/
  71. #define    INV_COMPRESSION    15
  72. #define    INV_VSCSI    16    /* SCSI devices on jag other than disk and tape */
  73. #define    INV_DISPLAY     17
  74. #define    INV_UNC_SCSILUN    18    /* Unconnected SCSI lun */
  75. #define    INV_PCI        19    /* PCI Bus */
  76. #define    INV_PCI_NO_DRV    20    /* PCI Bus without any driver */
  77. #define    INV_PROM        21    /* Different proms in the system */
  78.  
  79. /* types for class processor */
  80. #define INV_CPUBOARD    1
  81. #define INV_CPUCHIP    2
  82. #define INV_FPUCHIP    3
  83. #define INV_CCSYNC    4    /* CC Rev 2+ sync join counter */
  84.  
  85. /* states for cpu and fpu chips are revision numbers */
  86.  
  87. /* cpuboard states */
  88. #define INV_IP20BOARD   10
  89. #define INV_IP19BOARD   11
  90. #define INV_IP22BOARD   12
  91. #define INV_IP21BOARD    13
  92. #define INV_IP26BOARD    14
  93. #define INV_IP25BOARD    15
  94. #define INV_IP30BOARD    16
  95. #define INV_IP28BOARD    17
  96. #define INV_IP32BOARD    18
  97. #define INV_IP27BOARD    19
  98. #define INV_IPMHSIMBOARD 20
  99.  
  100. /* types for class INV_IOBD */
  101. #define INV_EVIO    2    /* EVEREST I/O board */
  102. #define INV_O200IO    3    /* Origin 200 base I/O */
  103. /* states for class INV_IOBD type INV_EVERESTIO -- value of eb_type field */
  104. #define INV_IO4_REV1    0x21    
  105.  
  106. /* types for class disk */
  107. /* NB: types MUST be unique within a class.
  108.    Please check this if adding new types. */
  109.  
  110. #define INV_SCSICONTROL    1
  111. #define INV_SCSIDRIVE    2
  112. #define INV_SCSIFLOPPY    5    /* also cdroms, optical disks, etc. */
  113. #define INV_JAGUAR    16    /* Interphase Jaguar */
  114. #define INV_VSCSIDRIVE    17    /* Disk connected to Jaguar */
  115. #define INV_GIO_SCSICONTROL 18    /* optional GIO SCSI controller */
  116. #define INV_SCSIRAID    19    /* SCSI attached RAID */
  117. #define INV_XLVGEN      20    /* Generic XLV disk device */
  118. #define INV_PCCARD    21    /* PC-card (PCMCIA) devices */
  119. #define INV_PCI_SCSICONTROL    22   /* optional PCI SCSI controller */
  120.  
  121. /* states for INV_SCSICONTROL disk type; indicate which chip rev;
  122.  * for 93A and B, unit field has microcode rev. */
  123. #define INV_WD93    0    /* WD 33C93  */
  124. #define INV_WD93A    1    /* WD 33C93A */
  125. #define INV_WD93B    2    /* WD 33C93B */
  126. #define INV_WD95A    3    /* WD 33C95A */
  127. #define INV_SCIP95    4       /* SCIP with a WD 33C95A */
  128. #define INV_ADP7880    5    /* Adaptec 7880 (single channel) */
  129. #define INV_QL_REV1     6       /* qlogic 1040  */
  130. #define INV_QL_REV2     7       /* qlogic 1040A */
  131. #define INV_QL_REV2_4   8       /* qlogic 1040A rev 4 */
  132. #define INV_QL_REV3     9       /* qlogic 1040B */
  133. #define INV_FCADP    10    /* Adaptec Emerald Fibrechannel */
  134. #define INV_QL_REV4     11      /* qlogic 1040B rev 2 */
  135. #define INV_QL        12    /* Unknown QL version */    
  136.  
  137.  
  138. /* states for INV_SCSIDRIVE type of class disk */
  139. #define INV_RAID5_LUN    0x100
  140.  
  141. /* states for INV_SCSIFLOPPY type of class disk */
  142. #define INV_TEAC_FLOPPY 1       /* TEAC 3 1/2 inch floppy drive */
  143. #define INV_INSITE_FLOPPY 2     /* INSITE, IOMEGA  Io20S, SyQuest floppy drives */
  144.  
  145. /* END OF CLASS DISK TYPES */
  146.  
  147. /* types for class memory */
  148. /* NB. the states for class memory are sizes in bytes */
  149. #define INV_MAIN    1
  150. #define INV_DCACHE    3
  151. #define INV_ICACHE    4
  152. #define INV_WBUFFER    5
  153. #define INV_SDCACHE    6
  154. #define INV_SICACHE    7
  155. #define INV_SIDCACHE    8
  156. #define INV_MAIN_MB    9
  157. #define INV_HUBSPC      10      /* HUBSPC */
  158.  
  159. /* types for class serial */
  160. #define INV_CDSIO    1    /* Central Data serial board */
  161. #define INV_T3270    2    /* T3270 emulation */
  162. #define INV_GSE        3    /* SpectraGraphics Gerbil coax cable */
  163. #define INV_SI        4    /* SNA SDLC controller */
  164. #define    INV_M333X25     6    /* X.25 controller */
  165. #define INV_CDSIO_E    7    /* Central Data serial board on E space */
  166. #define INV_ONBOARD    8    /* Serial ports per CPU board */
  167. #define INV_EPC_SERIAL    9    /* EVEREST I/O EPC serial port */
  168. #define INV_ICA        10    /* IRIS (IBM) Channel Adapter card */
  169. #define INV_VSC        11    /* SBE VME Synch Comm board */
  170. #define INV_ISC        12    /* SBE ISA Synch Comm board */
  171. #define INV_GSC        13    /* SGI GIO Synch Comm board */
  172. #define INV_ASO_SERIAL    14    /* serial portion of SGI ASO board */
  173. #define INV_PSC        15    /* SBE PCI Synch Comm board */
  174. #define INV_IOC3_DMA    16    /* DMA mode IOC3 serial */
  175. #define INV_IOC3_PIO    17    /* PIO mode IOC3 serial */
  176.  
  177. /* types for class parallel */
  178. #define INV_GPIB    2    /* National Instrument GPIB board */
  179. #define INV_GPIB_E    3    /* National Instrument GPIB board on E space*/
  180. #define INV_EPC_PLP    4    /* EVEREST I/O EPC Parallel Port */
  181. #define INV_ONBOARD_PLP    5    /* Integral parallel port,
  182.                       state = 0 -> output only
  183.                       state = 1 -> bi-directional */
  184. #define INV_EPP_ECP_PLP    6    /* Integral EPP/ECP parallel port */
  185.  
  186. /* types for class tape */
  187. #define INV_SCSIQIC    1    /* Any SCSI tape, not just QIC{24,150}... */
  188. #define INV_VSCSITAPE    4    /* SCSI tape connected to Jaguar */
  189.  
  190. /* sub types for type INV_SCSIQIC and INV_VSCSITAPE (in state) */
  191. #define TPUNKNOWN    0    /* type not known */
  192. #define TPQIC24        1    /* QIC24 1/4" cartridge */
  193. #define TPDAT        2    /* 4mm Digital Audio Tape cartridge */
  194. #define TPQIC150    3    /* QIC150 1/4" cartridge */
  195. #define TP9TRACK    4    /* 9 track reel */
  196. #define TP8MM_8200    5    /* 8 mm video tape cartridge */
  197. #define TP8MM_8500    6    /* 8 mm video tape cartridge */
  198. #define TPQIC1000    7    /* QIC1000 1/4" cartridge */
  199. #define TPQIC1350    8    /* QIC1350 1/4" cartridge */
  200. #define TP3480        9    /* 3480 compatible cartridge */
  201. #define TPDLT        10    /* DEC Digital Linear Tape cartridge */
  202. #define TPD2        11    /* D2 tape cartridge */
  203. #define TPDLTSTACKER    12    /* DEC Digital Linear Tape stacker */
  204. #define TPNTP        13    /* IBM Magstar cartridge */
  205. #define TPNTPSTACKER    14    /* IBM Magstar stacker */
  206. #define TPSTK9490       15      /* StorageTeK 9490 */
  207. #define TPSTKSD3        16      /* StorageTeK SD3 */
  208. #define TPGY10            17      /* Sony GY-10 */
  209. #define TP8MM_8900    18    /* 8 mm (AME) tape cartridge */
  210. #define TPMGSTRMP    19    /* IBM Magstar MP cartridge */
  211. #define TPMGSTRMPSTCKR    20    /* IBM Magstar MP stacker */
  212. #define TPSTK4791       21      /* StorageTek 4791 */
  213. #define TPSTK4781       22      /* StorageTek 4781 */
  214. #define TPFUJDIANA1     23      /* Fujitsu Diana-1 (M101) */
  215. #define TPFUJDIANA2     24      /* Fujitsu Diana-2 (M2483) */
  216. #define TPFUJDIANA3     25      /* Fujitsu Diana-3 (M2488) */
  217. #define TP8MM_AIT    26    /* Sony AIT format tape */
  218. #define TPTD3600        27      /* Philips TD3600 */
  219. #define TPTD3600STCKR   28      /* Philips TD3600 stacker */
  220. #define TPNCTP          29      /* Philips NCTP */
  221. #define TPGY2120        30      /* Sony GY-2120 (replaces GY-10)  */
  222.  
  223.  
  224. /*
  225.  *  GFX invent is a subset of gfxinfo
  226.  */
  227.  
  228. /* types for class graphics */
  229. #define INV_GR1BOARD    1    /* GR1 (Eclipse) graphics */
  230. #define INV_GR1BP    2    /* OBSOLETE - use INV_GR1BIT24 instead */
  231. #define INV_GR1ZBUFFER    3    /* OBSOLETE - use INV_GR1ZBUF24 instead */
  232. #define INV_GRODEV    4    /* Clover1 graphics */
  233. #define INV_GMDEV    5    /* GT graphics */
  234. #define INV_CG2        6    /* CG2 composite video/genlock board */
  235. #define INV_VMUXBOARD    7    /* VMUX video mux board */
  236. #define    INV_VGX        8    /* VGX (PowerVision) graphics */
  237. #define    INV_VGXT    9    /* VGXT (PowerVision) graphics with IMP5s. */
  238. #define    INV_LIGHT    10    /* LIGHT graphics */
  239. #define INV_GR2        11    /* EXPRESS graphics */
  240. #define INV_RE        12    /* RealityEngine graphics */
  241. #define INV_VTX        13    /* RealityEngine graphics - VTX variant */
  242. #define INV_NEWPORT    14    /* Newport graphics */
  243. #define INV_MGRAS    15    /* Mardigras graphics */
  244. #define INV_IR        16    /* InfiniteReality graphics */
  245. #define INV_CRIME    17    /* Moosehead on board CRIME graphics */
  246. #define INV_IR2        18    /* Onyx2 InfiniteReality2 graphics */
  247. #define INV_IR2LITE    19    /* Onyx2 Reality graphics */
  248.  
  249. /* states for graphics class GR1 */
  250. #define INV_GR1REMASK    0x7    /* RE version */
  251. #define INV_GR1REUNK    0x0    /* RE version unknown */
  252. #define INV_GR1RE1    0x1    /* RE1 */
  253. #define INV_GR1RE2    0x2    /* RE2 */
  254. #define INV_GR1BUSMASK    0x38    /* GR1 bus architecture */
  255. #define INV_GR1PB    0x00    /* Eclipse private bus */
  256. #define INV_GR1PBVME    0x08    /* VGR2 board VME and private bus interfaces */
  257. #define INV_GR1TURBO    0x40    /* has turbo option */
  258. #define INV_GR1BIT24      0x80    /* has bitplane option */
  259. #define INV_GR1ZBUF24     0x100   /* has z-buffer option */
  260. #define INV_GR1SMALLMON 0x200   /* using 14" monitor */
  261. #define INV_GR1SMALLMAP 0x400   /* has 256 entry color map */
  262. #define INV_GR1AUX4     0x800   /* has AUX/WID plane option */
  263.  
  264. /* states for graphics class GR2 */
  265.         /* bitmasks */
  266. #define INV_GR2_Z    0x1    /* has z-buffer option */
  267. #define INV_GR2_24    0x2    /* has bitplane option */
  268. #define INV_GR2_4GE     0x4     /* has 4 GEs */
  269. #define INV_GR2_1GE    0x8    /* has 1 GEs */
  270. #define INV_GR2_2GE    0x10    /* has 2 GEs */
  271. #define INV_GR2_8GE    0x20    /* has 8 GEs */
  272. #define INV_GR2_GR3    0x40    /* board GR3 */
  273. #define INV_GR2_GU1    0x80    /* board GU1 */
  274. #define INV_GR2_INDY    0x100   /* board GR3 on Indy*/
  275. #define INV_GR2_GR5    0x200    /* board GR3 with 4 GEs, hinv prints GR5-XZ */
  276.  
  277.         /* supported configurations */
  278. #define INV_GR2_XS    0x0     /* GR2-XS */
  279. #define INV_GR2_XSZ    0x1     /* GR2-XS with z-buffer */
  280. #define INV_GR2_XS24    0x2     /* GR2-XS24 */
  281. #define INV_GR2_XS24Z    0x3     /* GR2-XS24 with z-buffer */
  282. #define INV_GR2_XSM    0x4     /* GR2-XSM */
  283. #define INV_GR2_ELAN    0x7    /* GR2-Elan */
  284. #define    INV_GR2_XZ    0x13    /* GR2-XZ */
  285. #define    INV_GR3_XSM    0x44    /* GR3-XSM */
  286. #define    INV_GR3_ELAN    0x47    /* GR3-Elan */
  287. #define    INV_GU1_EXTREME    0xa3    /* GU1-Extreme */
  288.  
  289. /* States for graphics class NEWPORT */
  290. #define    INV_NEWPORT_XL    0x01    /* Indigo2 XL model */
  291. #define INV_NEWPORT_24    0x02    /* board has 24 bitplanes */
  292. #define INV_NEWTON      0x04    /* Triton SUBGR tagging */
  293.  
  294. /* States for graphics class MGRAS */
  295. #define INV_MGRAS_ARCHS    0xff000000    /* architectures */
  296. #define INV_MGRAS_HQ3    0x00000000    /* impact */
  297. #define INV_MGRAS_HQ4    0x01000000    /* gamera */
  298. #define INV_MGRAS_MOT    0x02000000    /* mothra */
  299. #define INV_MGRAS_GES    0x00ff0000    /* number of GEs */
  300. #define INV_MGRAS_1GE    0x00010000
  301. #define INV_MGRAS_2GE    0x00020000
  302. #define INV_MGRAS_RES    0x0000ff00    /* number of REs */
  303. #define INV_MGRAS_1RE    0x00000100
  304. #define INV_MGRAS_2RE    0x00000200
  305. #define INV_MGRAS_TRS    0x000000ff    /* number of TRAMs */
  306. #define INV_MGRAS_0TR    0x00000000
  307. #define INV_MGRAS_1TR    0x00000001
  308. #define INV_MGRAS_2TR    0x00000002
  309.  
  310. /* types for class network */
  311. #define INV_NET_ETHER        0    /* 10Mb Ethernet */
  312. #define INV_NET_HYPER        1    /* HyperNet */
  313. #define    INV_NET_CRAYIOS        2    /* Cray Input/Ouput Subsystem */
  314. #define    INV_NET_FDDI        3    /* FDDI */
  315. #define INV_NET_TOKEN        4    /* 16/4 Token Ring */
  316. #define INV_NET_HIPPI        5    /* HIPPI */
  317. #define INV_NET_ATM        6    /* ATM */
  318. #define INV_NET_ISDN_BRI    7    /* ISDN */
  319. #define INV_NET_ISDN_PRI    8    /* PRI ISDN */
  320. #define INV_NET_HIPPIS        9    /* HIPPI-Serial */
  321.  
  322. /* controllers for network types, unique within class network */
  323. #define INV_ETHER_EC    0    /* IP6 integral controller */
  324. #define INV_ETHER_ENP    1    /* CMC board */
  325. #define INV_ETHER_ET    2    /* IP5 integral controller */
  326. #define INV_HYPER_HY    3    /* HyperNet controller */
  327. #define    INV_CRAYIOS_CFEI3 4    /* Cray Front End Interface, v3 */
  328. #define    INV_FDDI_IMF    5    /* Interphase/Martin 3211 FDDI */
  329. #define INV_ETHER_EGL    6    /* Interphase V/4207 Eagle */
  330. #define INV_ETHER_FXP    7    /* CMC C/130 FXP */
  331. #define INV_FDDI_IPG    8    /* Interphase/SGI 4211 Peregrine FDDI */
  332. #define INV_TOKEN_FV    9    /* Formation fv1600 Token-Ring board */
  333. #define INV_FDDI_XPI    10    /* XPI GIO bus FDDI */
  334. #define INV_TOKEN_GTR    11    /* GTR GIO bus TokenRing */
  335. #define INV_ETHER_GIO    12    /* IP12/20 optional GIO ethernet controller */
  336. #define INV_ETHER_EE    13    /* Everest IO4 EPC SEEQ/EDLC */
  337. #define INV_HIO_HIPPI    14    /* HIO HIPPI for Challenge/Onyx */
  338. #define INV_ATM_GIO64    15    /* ATM OC-3c Mez card */
  339. #define INV_ETHER_EP    16    /* 8-port E-Plex Ethernet */
  340. #define INV_ISDN_SM    17    /* Siemens PEB 2085 */
  341. #define INV_TOKEN_MTR    18    /* EISA TokenRing */
  342. #define INV_ETHER_EF    19    /* IOC3 Ethernet */
  343. #define INV_ISDN_48XP    20    /* Xircom PRI-48XP */
  344. #define INV_FDDI_RNS    21    /* Rockwell Network Systems FDDI */
  345. #define INV_HIPPIS_XTK    22    /* Xtalk HIPPI-Serial */
  346. #define INV_ATM_QUADOC3    23    /* Xtalk Quad OC-3c ATM interface */
  347. #define INV_TOKEN_MTRPCI 24     /* PCI TokenRing */
  348.  
  349. /* Types for class INV_SCSI and INV_VSCSI; The type code is the same as
  350.  * the device type code returned by the Inquiry command, iff the Inquiry
  351.  * command defines a type code for the device in question.  If it doesn't,
  352.  * values over 31 will be used for the device type.
  353.  * Note: the lun is encoded in bits 8-15 of the state.  The
  354.  * state field low 3 bits contains the information from the inquiry
  355.  * cmd that indicates ANSI SCSI 1,2, etc. compliance, and bit 7
  356.  * contains the inquiry info that indicates whether the media is
  357.  * removable.
  358.  */
  359. #define INV_PRINTER    2    /* SCSI printer */
  360. #define INV_CPU        3    /* SCSI CPU device */
  361. #define INV_WORM    4    /* write-once-read-many (e.g. optical disks) */
  362. #define INV_CDROM    5    /* CD-ROM  */
  363. #define INV_SCANNER    6    /* scanners */
  364. #define INV_OPTICAL    7    /* optical disks (read-write) */
  365. #define INV_CHANGER    8    /* jukebox's for CDROMS, for example */
  366. #define INV_COMM    9    /* Communications device */
  367. #define INV_RAIDCTLR    32    /* RAID ctlr actually gives type 0 */
  368.  
  369. /* bit definitions for state field for class INV_SCSI */
  370. #define INV_REMOVE    0x80    /* has removable media */
  371. #define INV_SCSI_MASK    7    /* to which ANSI SCSI standard device conforms*/
  372.  
  373. /* types for class INV_AUDIO */
  374.  
  375. #define INV_AUDIO_HDSP        0    /* Indigo DSP system */
  376. #define INV_AUDIO_VIGRA110    1    /* ViGRA 110 audio board */
  377. #define INV_AUDIO_VIGRA210    2    /* ViGRA 210 audio board */
  378. #define INV_AUDIO_A2        3    /* HAL2 / Audio Module for Indigo 2 */
  379. #define INV_AUDIO_A3        4    /* Moosehead (IP32) AD1843 codec */
  380. #define INV_AUDIO_RAD        5    /* RAD PCI chip */
  381.  
  382. /* types for class INV_VIDEO */
  383.  
  384. #define    INV_VIDEO_LIGHT        0
  385. #define    INV_VIDEO_VS2        1    /* MultiChannel Option */
  386. #define    INV_VIDEO_EXPRESS    2    /* kaleidecope video */
  387. #define    INV_VIDEO_VINO        3
  388. #define    INV_VIDEO_VO2        4    /* Sirius Video */
  389. #define    INV_VIDEO_INDY        5    /* Indy Video - kal vid on Newport
  390.                       gfx on Indy */
  391. #define    INV_VIDEO_MVP        6    /* Moosehead Video Ports */
  392. #define    INV_VIDEO_INDY_601    7    /* Indy Video 601 */
  393. #define    INV_VIDEO_PMUX        8    /* PALMUX video w/ PGR gfx */
  394. #define    INV_VIDEO_MGRAS        9    /* Galileo 1.5 video */
  395. #define    INV_VIDEO_DIVO        10    /* DIVO video */
  396. #define    INV_VIDEO_RACER        11    /* SpeedRacer Pro Video */
  397. #define    INV_VIDEO_EVO        12    /* EVO Personal Video */
  398.  
  399. /* states for video class INV_VIDEO_EXPRESS */
  400.  
  401. #define INV_GALILEO_REV        0xF
  402. #define INV_GALILEO_JUNIOR    0x10
  403. #define INV_GALILEO_INDY_CAM    0x20
  404. #define INV_GALILEO_DBOB    0x40
  405. #define INV_GALILEO_ELANTEC    0x80
  406.  
  407. /* states for video class VINO */
  408.  
  409. #define INV_VINO_REV        0xF
  410. #define INV_VINO_INDY_CAM    0x10
  411. #define INV_VINO_INDY_NOSW    0x20    /* nebulous - means s/w not installed */
  412.  
  413. /* states for video class MVP */
  414.  
  415. #define INV_MVP_REV(x)        (((x)&0x0000000f))
  416. #define INV_MVP_REV_SW(x)    (((x)&0x000000f0)>>4)
  417. #define INV_MVP_AV_BOARD(x)    (((x)&0x00000f00)>>8)
  418. #define    INV_MVP_AV_REV(x)    (((x)&0x0000f000)>>12)
  419. #define    INV_MVP_CAMERA(x)    (((x)&0x000f0000)>>16)
  420. #define    INV_MVP_CAM_REV(x)    (((x)&0x00f00000)>>20)
  421.  
  422. /* types for class INV_BUS */
  423.  
  424. #define INV_BUS_VME    0
  425. #define INV_BUS_EISA    1
  426. #define INV_BUS_GIO    2
  427. #define INV_BUS_BT3_PCI    3
  428.  
  429. /* types for class INV_MISC */
  430. #define INV_MISC_EPC_EINT    0    /* EPC external interrupts */
  431. #define INV_MISC_PCKM        1    /* pc keyboard or mouse */
  432. #define INV_MISC_IOC3_EINT    2    /* IOC3 external interrupts */
  433.  
  434. /*  types for class INV_PROM */
  435. #define INV_IO6PROM    0
  436. #define INV_IP27PROM    1
  437. #define INV_FCNVRAM    2
  438.  
  439.  
  440. /* types for class INV_COMPRESSION */
  441.  
  442. #define    INV_COSMO        0
  443. #define    INV_INDYCOMP        1
  444. #define    INV_IMPACTCOMP        2    /* cosmo2, aka impact compression */
  445. #define    INV_VICE        3     /* Video imaging & compression engine */
  446.  
  447. /* types for class INV_DISPLAY */
  448. #define INV_PRESENTER_BOARD     0       /* Indy Presenter adapter board */
  449. #define INV_PRESENTER_PANEL     1       /* Indy Presenter board and panel */
  450. #define INV_ICO_BOARD           2    /* IMPACT channel option board */
  451.  
  452.  
  453. typedef struct invent_generic_s {
  454.     unsigned short    ig_module;
  455.     unsigned short    ig_slot;
  456.     unsigned char    ig_flag;
  457.     int    ig_invclass;
  458. } invent_generic_t;
  459.  
  460. #define INVENT_ENABLED    0x1
  461.  
  462. typedef struct invent_membnkinfo {
  463.     unsigned short    imb_size;    /* bank size in MB */
  464.     unsigned short    imb_attr;    /* Mem attributes */
  465.     unsigned int    imb_flag;    /* bank flags */
  466. } invent_membnkinfo_t;
  467.  
  468.  
  469. typedef struct invent_meminfo {
  470.     invent_generic_t     im_gen;
  471.     unsigned short    im_size;    /* memory size     */
  472.     unsigned short    im_banks;    /* number of banks */
  473.     /*
  474.      * declare an array with one element. Each platform is expected to
  475.      * allocate the size required based on the number of banks and set
  476.      * the im_banks correctly for this array traversal.
  477.      */
  478.     invent_membnkinfo_t im_bank_info[1]; 
  479. } invent_meminfo_t;
  480.  
  481. #define INV_MEM_PREMIUM     0x01
  482.  
  483. typedef struct invent_cpuinfo {
  484.     invent_generic_t ic_gen;
  485.     cpu_inv_t     ic_cpu_info;
  486.     unsigned short    ic_cpuid;
  487.     unsigned short    ic_slice;
  488. } invent_cpuinfo_t;
  489.  
  490. typedef struct invent_miscinfo {
  491.     invent_generic_t im_gen;
  492.     int             im_rev;
  493.     int             im_type;
  494. } invent_miscinfo_t;
  495.     
  496. #define MISC_INVENT_HUB 1
  497.     
  498. #ifdef _KERNEL
  499. #include "sys/graph.h"
  500. #include "sys/hwgraph.h"
  501.  
  502. typedef struct irix5_inventory_s {
  503.     app32_ptr_t    inv_next;    /* next inventory record in list */
  504.     int    inv_class;        /* class of object */
  505.     int    inv_type;        /* class sub-type of object */
  506.     major_t    inv_controller;        /* object major identifier */
  507.     minor_t    inv_unit;        /* object minor identifier */
  508.     int    inv_state;        /* information specific to object or
  509.                        class */
  510. } irix5_inventory_t;
  511.  
  512. typedef struct invplace_s {
  513.     vertex_hdl_t        invplace_vhdl;        /* current vertex */
  514.     graph_vertex_place_t    invplace_vplace;    /* place in vertex list */
  515.     inventory_t        *invplace_inv;        /* place in inv list on vertex */
  516. } invplace_t; /* Magic cookie placeholder in inventory list */
  517.  
  518. #define INVPLACE_NONE invplace_none
  519.  
  520. extern void        add_to_inventory(int, int, int, int, int);
  521. extern void        replace_in_inventory(inventory_t *, int, int, int, int, int);
  522. extern inventory_t  *get_next_inventory(invplace_t *);
  523. extern inventory_t  *find_inventory(inventory_t *, int, int, int, int, int);
  524. extern int        scaninvent(int (*)(inventory_t *, void *), void *);
  525. extern int        get_sizeof_inventory(int);
  526.  
  527. extern void device_inventory_add(    dev_t device, 
  528.                     int class, 
  529.                     int type, 
  530.                     major_t ctlr, 
  531.                     minor_t unit, 
  532.                     int state);
  533.  
  534.  
  535. extern inventory_t *device_inventory_get_next(    dev_t device,
  536.                         invplace_t *);
  537.  
  538. extern void device_controller_num_set(    dev_t,
  539.                     int);
  540. extern int device_controller_num_get(    dev_t);
  541. #endif /* _KERNEL */
  542. #endif /* __SYS_INVENT_H__ */
  543.